//
//  WHAboutUsController.m
//  SquirrelCourier
//
//  Created by 邓伟浩 on 2019/1/3.
//  Copyright © 2019 邓伟浩. All rights reserved.
//

#import "WHAboutUsController.h"

@interface WHAboutUsController ()

@end

@implementation WHAboutUsController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"关于我们";
    [self setUpUI];
}

- (void)setUpUI {
    UIImageView *logoImageView = [[UIImageView alloc] init];
    logoImageView.image = IMAGE_NAMED(@"logo_aboutUs_png");
    logoImageView.contentMode = UIViewContentModeScaleAspectFit;
    [self.view addSubview:logoImageView];
    [logoImageView mas_updateConstraints:^(MASConstraintMaker *make) {
        make.width.height.mas_equalTo(kRealwidth(180));
        make.centerX.mas_equalTo(self.view.mas_centerX);
        make.centerY.mas_equalTo(self.view.mas_centerY);
    }];
    
    // app版本
    NSString *appVersionStr = kAppVersion;
#if DEBUG
    appVersionStr = NSStringFormat(@"内测版本V%@", kAppVersion);
    
#else
    appVersionStr = NSStringFormat(@"版本V%@", kAppVersion);
#endif
    
    UILabel *versionLabel = [[UILabel alloc] init];
    NSAttributedString *versionAttributeStr = [[NSAttributedString alloc] initWithString:appVersionStr attributes:@{NSForegroundColorAttributeName:CFontContentLightGrayColor, NSFontAttributeName:SYSTEMFONT(kRealwidth(15))}];
    versionLabel.attributedText = versionAttributeStr;
    [self.view addSubview:versionLabel];
    [versionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(kRealwidth(15));
        make.bottom.mas_equalTo(self.view.mas_bottom).offset(-kRealwidth(50));
        make.centerX.mas_equalTo(self.view.mas_centerX);
        
    }];
    
    UILabel *numberLabel = [[UILabel alloc] init];
    NSString *numberStr = NSStringFormat(@"联系客服：%@", ServiceTel);
    NSAttributedString *numberAttributeStr = [[NSAttributedString alloc] initWithString:numberStr attributes:@{NSForegroundColorAttributeName:CFontContentLightGrayColor, NSFontAttributeName:SYSTEMFONT(kRealwidth(12))}];
    numberLabel.attributedText = numberAttributeStr;
    [self.view addSubview:numberLabel];
    [numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(kRealwidth(12));
        make.bottom.mas_equalTo(versionLabel.mas_top).offset(-kRealwidth(15));
        make.centerX.mas_equalTo(self.view.mas_centerX);
        
    }];
}

@end
